<?php
#[引入无限级分类]
$r_url = "admin.php?file=newsletter";
#[信息录入]
if($sysAct == "add")
{
	#[判断权限]
	if($_SESSION["admin"]["typer"] != "system" && !$QG_AP["msg_".$sysgroupid])
	{
		Error("对不起，您没有权限操作当前功能","admin.php?file=index");
	}
	Foot("newsletter.add.qg");
}
elseif($sysAct == "addok")
{

}
elseif($sysAct == "modify")
{
    
}
elseif($sysAct == "modifyok")
{
    
}
elseif($sysAct == "plset")
{
	$myidlist = $STR->safe($idlist);#[获取IDlist]
	if(!$myidlist)
	{
		Error("信息操作不正确","admin.php?file=newsletter&act=list");
	}
	$qgtype = $STR->safe($qgtype);
	if($qgtype == "delete")
	{
		$idarray = explode(",",$myidlist);
		foreach($idarray AS $key=>$value)
		{
			$value = intval($value);
			if($value)
			{
				$DB->qgQuery("DELETE FROM ".$prefix."emails WHERE id='".$value."'");#[删除主题]
				$DB->qgQuery($sql);#[写入数据库]
			}
		}
		Error("批量删除主题完成！","admin.php?file=newsletter&act=list");
	}
}
else
{
	#[判断权限]
	if($_SESSION["admin"]["typer"] != "system" && !$QG_AP["msg_".$sysgroupid])
	{
		Error("对不起，您没有权限操作当前功能","admin.php?file=index");
	}
	
	$sql = "SELECT id,name,email,date FROM ".$prefix."emails";
	$rslist = $DB->qgGetAll($sql,true);

	Foot("newsletter.list.qg");
}

?>